<!DOCTYPE html>
<html>

<head>

  <title>underScore 源码测试页面</title>
  
</head>

<body>
  <div style="background: green; width: 5rem; height: 5rem;display: flex; ">
    <div style="background: lightcoral;width: 1rem; height: 1rem;margin:auto"></div>
  </div>
  <input type="text" readonly>
  <input type="text" disabled>

</body>
<script src="./underScore.js"></script>
<script>
  function A(){}
  A.prototype.toString = function(){
       return 'A'
    }

  var a = new A();
  var a1 = new A();
  var result = _.isEqual(a, a1);
  console.log(result);
  
  console.log(Object.prototype.toString(a))
  console.log(Object.prototype.toString.call(a))

  console.log(Object.prototype.toString([]))
  console.log(Object.prototype.toString.call([]))

  
  // 内建立的包装类$1，特殊处理
  // var $1= _['default'];
  // var b = new $1();
  // var b1 = new $1();
  // var result2 = _.isEqual(b, b1);
  // console.log(result2);  // false
  // console.log(b instanceof $1);

  // compose
 var greet    = function(name){ return "hi: " + name; };
 var exclaim  = function(statement){ return statement.toUpperCase() + "!"; };
 var welcome = _.compose(greet, exclaim);
 console.log( welcome('moe'));

</script>

</html>